<?php
/**
 * Created by dutuwang.net
 * User: adophper <hello@adophper.com>
 * Date: 2018/4/4
 * Time: 17:21
 */
?>
<div class="detailBox_listbox row">
    <?php
    if (!empty($data['data'])) {
        foreach ($data['data'] as $val) {
            ?>
            <div class="detailBox_listitem col-md-4 col-sm-6">
                <div class="child">
                    <div class="recomedBox_item_img_box img">
                        <a class="text-center" href="<?=Yii::$app->urlManager->createUrl(['zhanhui/detail', 'id' => $val['id']])?>" target="_blank" title="<?=$val['title']?>"><img src="<?=$val['litpic']?>_350x210.jpg" alt="<?=$val['title']?>" /></a>
                        <span class="flex f_center"><label class="compare_to" data-id="<?=$val['id']?>"><input type="checkbox" id="compare_<?=$val['id']?>" <?=isset($compareData[$val['id']])?'checked="checked"':''?> /> &nbsp;加入对比</label></span>
                    </div>
                    <div class="recomedBox_item_min">
                    <div class="t_o_lin recomedBox_item_min_title">
                        <a href="<?=Yii::$app->urlManager->createUrl(['search/index', 'type' => 'category', 'value' => $val['category_id']])?>" class="t_red" target="_blank">[<?=$val['category_name']?>]</a><a href="<?=Yii::$app->urlManager->createUrl(['zhanhui/detail', 'id' => $val['id']])?>" target="_blank" title="<?=$val['title']?>"><?=$val['title']?></a>
                        <div class="flex rating-stars" title="<?=$val['score']?>">
                                <span class="empty-stars">
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                </span>
                            <span class="filled-stars" style="width: <?=$val['score']*20?>%;">
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                    <span class="star"><i class="glyphicon glyphicon-star"></i></span>
                                </span>
                        </div>
                    </div>
                    <p class="recomedBox_item_min_info flex f_between">
                        <span class="t_o"><i class="iconfont t_red">&#xe615;</i><?=Yii::t('frontend', 'exhibition_time')?>：<?=$val['show_start']?><i><?=Yii::t('frontend', 'to')?></i><?=$val['show_end']?></span>
                        <span class="t_o"><i class="iconfont t_red">&#xe620;</i><?=Yii::t('frontend', 'place')?>：<?=$val['city']?></span>
                    </p>
                    <div class="recomedBox_item_min_tab flex">
                        <a href="javascript:;" class="flex_tel list_qrcode" data-parent=".detailBox_listitem"><i class="flex f_center">二维码</i><em class="flex f_center iconfont large">&#xe8d2;</em></a>
                        <a href="<?=Yii::$app->urlManager->createUrl(['zhanhui/detail', 'id' => $val['id']])?>#photo" class="flex_tel"><i class="flex f_center">集锦</i><em class="flex f_center iconfont top">&#xe649;</em></a>
                        <a href="<?=Yii::$app->urlManager->createUrl(['zhanhui/detail', 'id' => $val['id']])?>#video" class="flex_tel"><i class="flex f_center">VR</i><em class="flex f_center iconfont large">&#xe77e;</em></a>
                        <a href="<?=Yii::$app->user->isGuest ? Yii::$app->urlManager->createUrl(['member/login']) : Yii::$app->urlManager->createUrl(['zhanhui/detail', 'id' => $val['id']])?>#comments" class="flex_tel"><i class="flex f_center">评论</i><em class="flex f_center iconfont small pencil">&#xe608;</em></a>
                    </div>
                </div>
                </div>
                <div class="wCode_mark sel hidden">
                    <span><img src="<?=$val['wechat_qrcode']?>" /></span>
                    <em>进入展会手机官网</em>
                </div>
            </div>
            <?php
        }
    }else{
        ?>
        <div class="col-md-12 text-center" style="padding: 50px 0; font-size: 18px;"><p>暂无数据...</p></div>
        <?php
    }
    ?>
</div>
<div class="detailBox_whitemin list-page text-center">
    <?php
    if (!empty($data['data'])) {
        echo \yii\widgets\LinkPager::widget([
            'pagination' => $data['page'],
            'maxButtonCount' => 6,
            'nextPageLabel' => Yii::t('frontend', 'next_page'),
            'prevPageLabel' => Yii::t('frontend', 'prev_page'),
            'firstPageLabel' => Yii::t('frontend', 'first_page'),
            'lastPageLabel' => Yii::t('frontend', 'last_page'),
        ]);
    }
    ?>
</div>
